
<!-- BEGIN PAGE CONTAINER-->
<div class="container-fluid">
    <!-- BEGIN PAGE HEADER-->
    <div class="row-fluid">
        <div class="span12">
            <!-- BEGIN PAGE TITLE & BREADCRUMB-->
            <h3 class="page-title">
                Quản lý Thành viên quản trị
            </h3>
            <ul class="breadcrumb">
                <li>
                    <i class="icon-home"></i>
                    <a href="index.html">Trang chủ</a>
                    <i class="icon-angle-right"></i>
                </li>
                <li>
                    <a href="<?php echo $this->createUrl('users/index'); ?>">Thành viên quản trị</a>
                    <i class="icon-angle-right"></i>
                </li>
                <li><a href="<?php echo $this->createUrl('users/index'); ?>">Danh sách thành viên quản trị</a></li>
            </ul>
            <!-- END PAGE TITLE & BREADCRUMB-->
        </div>
    </div>
    <!-- END PAGE HEADER-->
    <!-- BEGIN PAGE CONTENT-->
    <div class="row-fluid">
        <div class="span12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box light-grey">
                <div class="portlet-title">
                    <h4><i class="icon-bookmark-empty"></i>Danh sách thành viên quản trị</h4>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <div class="clearfix">
                        <div class="btn-group">
                            <a href="<?php echo $this->createUrl('users/create');?>"><button id="sample_editable_1_new" class="btn green">
                                Thêm mới <i class="icon-plus"></i>
                            </button></a>
                        </div>
                        <!--
                        <div class="btn-group pull-right">
                            <button class="btn red delete-user" type="button">
                                Xóa <i class="icon-trash"></i>
                            </button>
                        </div>
                        -->
                    </div>
                    <?php if(Yii::app()->user->hasFlash('message')):?>
                        <div class="alert alert-success">
                            <?php echo Yii::app()->user->getFlash('message'); ?>
                        </div>
                    <?php endif; ?>
                    <table class="table table-striped table-bordered table-hover" id="sample_1">
                        <thead>
                        <tr>
                            <th style="width:8px;"><input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes" /></th>
                            <th>Tên</th>
                            <th>Tên đăng nhập</th>
                            <th>Mật khẩu</th>
                            <th>Email</th>
                            <th>Quản trị</th>
                            <th width="80">Kích hoạt</th>
                            <th style="width:100px"></th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php $i =0; foreach ($model as $key => $data) {  $i++; ?>
                        <tr class="odd gradeX">
                            <td><input type="checkbox" class="checkboxes ckb-del" value="<?php echo $data->id;?>" /></td>
                            <td><?php echo $data['firstname'] .' '. $data['lastname']?></td>
                            <td><?php echo $data['username']?></td>
                            <td>********</td>
                            <td><?php echo $data['email']?></td>
                            <td><?=($data['role']==1)?'Toàn site':'Nội dung'?></td>
                            <td>
                            <?php if($data['status']==1):?>
                            	<span class="btn mini"><i class="icon-check"></i></span>
							<?php else: ?>
								<a class="btn blue mini" href="/admin/users/active/id/<?php echo $data->id;?>"><i class="icon-check"></i></a>
							<?php endif;?>
							</td>
                            <td>
                                <a class="btn green mini" href="<?php echo $this->createUrl('users/update', array('id' => $data['id']));?>"><i class="icon-pencil icon-white"></i></a>
                                <a class="btn red mini" href="<?php echo $this->createUrl('users/delete', array('id' => $data['id']));?>"><i class=" icon-remove icon-white"></i></a>
                            </td>
                        </tr>
                            <?php } ?>


                        </tbody>
                    </table>
                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
    <!-- END PAGE CONTENT-->
</div>
<!-- END PAGE CONTAINER-->